package org.yx.service.smfr.view_production_sn;

import org.dbist.dml.Page;
import org.dbist.dml.Query;
import org.yx.utils.BaseService;

/**
 * 查询产品批次信息
 * @author zxw
 * @since 2023/03/23
**/
public class SmfrViewProductionSnService extends BaseService {
	public SmfrViewProductionSnOut viewProductionSn(SmfrViewProductionSnIn in) throws Exception {
		SmfrViewProductionSnOut out = new SmfrViewProductionSnOut();
		Query query = new Query(in.getPageIndex(),in.getPageSize());
		query.addFilter("orgCode",in.getUserOrgCode());
		query.addFilter("mo",in.getMo());
		query.addFilter("psn",in.getPsn());

		Page<ProductionSn> psnPage = selectPageBySqlFilePath("select_product_sn",query,ProductionSn.class);
		out.setPsnList(psnPage.getList());
		out.setTotal(psnPage.getTotalSize());

		return out;
	}
}